Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: Telephony /
Chapter 5 - Telephone Manager Messages / Telephone Manager Message Reference
Constants


Terminal Messages

The following bit masks specify the messages that the Telephone Manager passes to your application for a given terminal activity. You also use these constants when you call TELTermMsgHand to specify which messages you want your message handler to receive.

When your terminal message handler receives a message, the hTEL parameter is a handle to the telephone record associated with the terminal that originated the message. The msg parameter is one of the following constants. The globals parameter is the value you specified when you called the TELTermMsgHand function to register the message handling routine. The mtype and value parameters vary in meaning according to the message type.

enum {
   telTermHookMsg          = 0x00000001,
   telTermKeyMsg           = 0x00000002,
   telTermVolMsg           = 0x00000004,
   telTermDisplayMsg       = 0x00000008,
   telTermEnableMsg        = 0x00000010,
   telTermOpenMsg          = 0x00000020,
   telTermCloseMsg         = 0x00000040,
   telTermResetMsg         = 0x00000080,
   telTermErrorMsg         = 0x00000100,
   telTermIndHSStateChgMsg = 0x00000200,
   telTermIndHSConnectMsg  = 0x00000400,
   telTermKeyImmMsg        = 0x00000800,
   telTermVolStateMsg      = 0x00001000,
   telTermOtherMsg         = 0x80000000,
   telAllTermMsgs          = 0x00001fff
};
Constant descriptions

telTermHookMsg
Your application receives this message when a hookswitch state associated with a terminal has changed (either because your application called TELSetHookSw or because the telephone was physically placed on or off hook). The mtype parameter is a constant that indicates the type of hookswitch. The value parameter is a constant that indicates whether the hookswitch state is on or off. See "Hookswitch Types and States" on page 2-11 for a description of the constants you can find in these parameters.
telTermKeyMsg
Your application receives this message when a key on an attached telephone set (either on the telephone keypad or a feature key) has been pressed. This message is queued and then sent to your message handler at system task time. (If keys are selected through software, notification is provided through the applicable directory number and call appearance message handlers.) The mtype parameter is a constant indicating which kind of key was pressed. The value parameter is the ASCII value for the key that was pressed or a constant that indicates a feature key. See "Key Press Constants" on page 5-27 for a description of these constants.
telTermVolMsg
Your application receives this message when a speaker volume level or a microphone sensitivity level has been adjusted for a given terminal (either because your application called TELSetVolume or TELAlert to modify the level, or because a user manually changed a volume setting on the telephone handset). The mtype parameter is a constant that indicates which volume or sensitivity has been set. The value parameter is constant that indicates the new level. This parameter is equal to telVolSame if the level has not been changed, or can have any value from telVolMin to telVolMax. See "Volume Controls" on page 2-12 for a description of the constants that can be passed in these parameters.
telTermDisplayMsg
Your application receives this message when the display on the telephone terminal has changed. The mtype parameter is a constant that indicates the current display mode. The value parameter is constant that indicates which item in the display has changed. See "Display Modes" on page 2-10 and "Display Items" on page 2-10 for a description of the constants that can be passed in these parameters.
telTermEnableMsg
Your application receives this message whenever the enabled state of a terminal changes. The mtype parameter is not used and is always set to 0. The value parameter is a constant that indicates the state of the connection between a tool and a terminal. See "Terminal States" on page 5-26 for a description of the constants that can be passed in this parameter.
telTermOpenMsg
Your application receives this message when a terminal is successfully opened in response to the TELOpenTerm function. The mtype and value parameters are not used and are always set to 0.
telTermCloseMsg
Your application receives this message when a terminal is shut down in response to the TELCloseTerm function. The mtype and value parameters are not used and are always set to 0.
telTermResetMsg
Your application receives this message when a terminal has been reset in response to the TELResetTerm function. The mtype and value parameters are not used and are always set to 0.
telTermErrorMsg
Your application receives this message when a terminal hardware related error has occurred (for example, the hardware device was disconnected). The mtype parameter specifies the error that occurred. See "Terminal Errors" on page 5-26 for a description of the values this parameter can contain. The value parameter is not used and is always set to 0.
telTermIndHSStateChgMsg
Your application receives this message when there is a change in the independent handset state (either because your application called TELIndHandsetConnect or because the independent handset was physically placed on or off hook by the user). The mtype parameter is a constant that specifies whether the handset is connected to the telephone line. The value parameter is constant that specifies whether the handset is on-hook or off-hook. These constants are described in "Independent Handset States" on page 2-14.
telTermIndHSConnectMsg
Your application receives this message after an independent handset has been connected or disconnected by the TELSetIndHSConnect function. The mtype parameter is not used and is always set to 0. The value parameter is constant that specifies whether the handset is connected to the telephone line. These constants are described in "Independent Handset States" on page 2-14.
telTermKeyImmMsg
Your application receives this message when a key on an attached telephone set (either on the telephone keypad or a feature key) has been pressed. This message is sent immediately, not at system task time. (If keys are selected through software, notification is provided through the applicable directory number and call appearance message handlers.) The mtype parameter is a constant indicating which kind of key was pressed. The value parameter is the ASCII value for the key that was pressed or a constant that indicates a feature key. See "Key Press Constants" on page 5-27 for a description of these constants.
telTermVolStateMsg
Your application receives this message when a user mutes a device (such as the handset speaker, handset microphone, or ringer) or turns it back on without changing the volume setting. The mtype parameter is a constant that indicates which device has had its volume state changed. The value parameter is a constant that indicates the new state of the device. See "Volume Controls" on page 2-12 for a description of these constants.
telTermOtherMsg
Your application receives this message when a telephone tool needs to send it some information about the terminal that cannot be provided by the other terminal messages. The values passed in the mtype and value parameters are defined by the telephone tool.
telAllTermMsgs
All terminal events except telTermOtherMsg.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 DEC 1996



Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help